for i in range(10):
    print(i)

print("-" * 200)

sum = 0
count = 0
print("哈喽，我是一个求平均值的函数")
user_input = input("请输入数字(输入q终止程序)")
while user_input != 'q':
    num = float(user_input)
    sum = sum + num
    count+=1
    user_input = input("请输入数字(输入q终止程序)")

if count == 0:
    result = 0
else :
    result = sum / count

print(result)

